import { Component } from '@angular/core';
import { IonicPage, NavController, NavParams} from 'ionic-angular';
import { TabsPage } from '../tabs/tabs';
import { AlertProvider } from '../../providers/alert/alert';

@IonicPage()
@Component({
  selector: 'page-login',
  templateUrl: 'login.html',
})
export class LoginPage {
  private json={username:'',password:''};
  constructor(public navCtrl: NavController, public navParams: NavParams,public alertCtrl:AlertProvider) {
  }

  ionViewDidLoad() {
    console.log('ionViewDidLoad LoginPage');
  }
  private login=():void=>{
    if(this.json.username=="" || this.json.password==""){
      this.alertCtrl.showAlert('警告','请把信息填写完整');
      return;
    }
    this.navCtrl.push(TabsPage);   
  }

}
